<html>
<head>
    <script type="text/javascript">
        date = new Date();
        var ONE_DAY = 1000 * 60 * 60 * 24;
        function render() {

            dateInput = document.getElementById('targetDate').value;

            if (dateInput) {
                var dateInfo = dateInput.split('/');
                date.setDate(dateInfo[0]);
                date.setMonth(dateInfo[1] - 1);
                date.setFullYear(dateInfo[2]);
            }
            var dateString = date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear();
            dateInput.value = dateString;

            var gadget = document.getElementById('gadget');
            var src='http://289.gmodules.com/ig/ifr?view=home&url=http://visitormap.googlecode.com/svn/trunk/SinceUntil.xml&nocache=';
            src += new Date().getTime();
            src += '&up_targetDate=';
            src += src += dateString;
            gadget.src = src;
        }

        function setDate(date) {
            dateInput = document.getElementById('targetDate');
            dateInput.value = date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear();     
        }

 </script>
</head>
<body>
<label for="targetDate">Target date</label><input type="text" id="targetDate" onchange="render()"/>
<br/>
<input type="button" value=" - " onclick="date = new Date(date.getTime() - ONE_DAY); setDate(date); render();"/>
<input type="button" value=" + " onclick="date = new Date(date.getTime() + ONE_DAY); setDate(date); render();"/>
<br/>
<iframe id="gadget" src="">

</iframe>
</body>
</html>